home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
11587
/
11587.xpi
/
chrome
/
aviary.jar
/
content
/
util.js
< prev
Wrap
Text File
|
2009-10-08
|
2KB
|
44 lines
/* Copyright (c) 2007-2009 Pearl Crescent, LLC. All Rights Reserved. */
/* vim: set sw=2 sts=2 ts=8 et syntax=javascript: */
// This file requires com.aviary.talon.pearlutil.
var gAviaryUtil =
{
HideInactiveTools: function(aToolList)
{
if (!aToolList)
return;
var toolInfo = {
20: { domID: "aviary-falcon", name: "", active: false },
1: { domID: "aviary-phoenix", name: "", active: false },
2: { domID: "aviary-toucan", name: "", active: false },
3: { domID: "aviary-peacock", name: "", active: false },
4: { domID: "aviary-raven", name: "", active: false },
5: { domID: "aviary-hummingbird", name: "", active: false },
6: { domID: "aviary-myna", name: "", active: false },
14: { domID: "aviary-woodpecker", name: "", active: false }};
var toolArray = aToolList.split(',');
for (var i = 0; i < toolArray.length; i += 2)
{
var tool = toolInfo[parseInt(toolArray[i])];
if (tool)
{
tool.active = true;
if ((i + 1) < toolArray.length)
tool.name = toolArray[i + 1];
}
}
for (var toolID in toolInfo)
{
var tool = toolInfo[toolID];
com.aviary.talon.pearlutil.SetElementAttribute(tool.domID, "hidden",
!tool.active);
}
}, // HideInactiveTools()
endOfObject: true
}; // gAviaryUtil